<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="Keywords" content="{$webinfo.web_keywords}" />
		<meta name="Description" content="{$webinfo.web_description}" />
		<title>注册 - {$webinfo.web_name}</title>
		<link rel="stylesheet" href="__PUBLIC__/Home/css/css.css" type="text/css" />
		<link rel="stylesheet" href="__PUBLIC__/Home/css/top.css" type="text/css" />
		<link rel="stylesheet" href="__PUBLIC__/Home/css/css_1.css" type="text/css" />
		<link rel="stylesheet" href="__PUBLIC__/Home/css/reg.css" type="text/css" />
        <script type="text/javascript" language="javascript" src="__PUBLIC__/Admin/js/jquery-1.8.3.min.js"></script>
	</head>
<body>
<include file="Index:top" />
		<div class="main_part" align="left">
			<div class="regTitle">
				<h2>用户注册</h2>
				我已有账号，<a href="__MODULE__/Login/index">[直接登录]</a>
			</div>
			<form action="__CONTROLLER__/insert" method="post" name="regForm" id="regForm">
				<table width="700" border="0" class="reg_table" cellspacing="0" cellpadding="0">
					<tr>
						<td class="reg_table_title" width="100">用户名：</td>
						<td width="240"><input type="text" class="inputTextBox" id="qth8UserName" name="user_name" onblur="checkusername()" /></td>
						<td class="ps"><div id="UserNamePs">2-16位，汉字、字母、数字、下划线</div>									</td>
					</tr>
					<tr>
						<td class="reg_table_title">密码：</td>
						<td><input type="password" class="inputTextBox" id="qth8PassWord" name="pwd" onblur="check_password()" /></td>
						<td class="ps"><div id="passWordPs">请输入6-16位密码</div>									</td>
					</tr>
					<tr>
						<td class="reg_table_title">确认密码：</td>
						<td><input type="password" class="inputTextBox" id="qth8PassWord1" name="pwd2" onblur="check_password1()" /></td>
						<td class="ps"><div id="passWord1Ps">请再输入一遍密码,以防错误</div>									</td>
					</tr>
					<tr>
						<td class="reg_table_title">验证码：</td>
						<td><input type="text" class="inputTextBox" style="width:70px;" name="verify" /><img src="__MODULE__/Register/verify" alt="点击更换图片" onclick="this.src='__MODULE__/Register/verify/cache/'+Math.random()" style="cursor:pointer" /></td>
						<td></td>
					</tr>
					<tr>
						<td class="reg_table_title"></td>
						<td><input id="Submit1" value="" class="reg_button" type="submit" /></td>
						<td>&nbsp;</td>
					</tr>
				</table>
			</form>
		</div>
		
	
	<script type="text/javascript">
	function check_password(){
		var password=document.regForm.qth8PassWord.value;
		if(password.length<6 || password.length>16 || password.length==0){
			document.getElementById("passWordPs").className="error_text";
			document.getElementById("passWordPs").innerHTML="请输入6-16位密码";
		}
		else{
			document.getElementById("passWordPs").className="right_text";
			document.getElementById("passWordPs").innerHTML="输入正确";
		}
	}
	function check_password1(){
		var password=document.regForm.qth8PassWord.value;
		var password1=document.regForm.qth8PassWord1.value;
		if(password!=password1){
			document.getElementById("passWord1Ps").className="error_text";
			document.getElementById("passWord1Ps").innerHTML="两次密码不相同";
		}
		else{
			document.getElementById("passWord1Ps").className="right_text";
			document.getElementById("passWord1Ps").innerHTML="输入正确";
		}

	}
	/*function checkusername(){
		var user_name_value=document.regForm.qth8UserName.value;
		if(!/^[a-zA-Z0-9\u4e00-\u9fa5_]{2,16}$/.test(user_name_value)){
			document.getElementById("UserNamePs").className="error_text";
			document.getElementById("UserNamePs").innerHTML="请输入汉字、字母、数字、下划线";
		}
		else{
			var xmlhttp;
			if (window.XMLHttpRequest)
	  		{// code for IE7+, Firefox, Chrome, Opera, Safari
	  			xmlhttp=new XMLHttpRequest();
	  		}
	  		else
	  		{// code for IE6, IE5
	  			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	  		}
	  		xmlhttp.onreadystatechange=function()
	  		{
	  			if (xmlhttp.readyState==4 && xmlhttp.status==200)
	  			{
	  				document.getElementById("UserNamePs").className="";
	  				document.getElementById("UserNamePs").innerHTML=xmlhttp.responseText;
	  			}
	  		}
	  		xmlhttp.open("GET","/services/?s=checkUserName&v="+user_name_value,true);
	  		xmlhttp.send();
	  	}
	  }*/

	function check_form(){
		var password=document.regForm.qth8PassWord.value;
		if(password.length<6 || password.length>16 || password.length==0){
			alert("请输入6-16位密码");
			return false;
		}
		var password1=document.regForm.qth8PassWord1.value;
		if(password!=password1){
			alert("两次密码不相同");
			return false;
		}
		var user_name_value=document.regForm.qth8UserName.value;
		if(!/^[a-zA-Z0-9\u4e00-\u9fa5_]{2,16}$/.test(user_name_value)){
			alert("请输入汉字、字母、数字、下划线！")
			return false;
		}
		return true;
	}

	if(getCookie("kfRegUserName")!="")
	{
		document.regForm.qth8UserName.value=decodeURI(escape(getCookie("kfRegUserName")));
		alert(decodeURI(escape(getCookie("kfRegPs"))));
	}
	</script>
	<include file="Index:foot" />
